package com.tianji.learning.controller;


import com.tianji.learning.domain.vo.SignResultVO;
import com.tianji.learning.service.ISignRecordService;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@Slf4j
@RestController
@RequestMapping("/sign-records")
@RequiredArgsConstructor
public class SignRecordController{

    private final ISignRecordService recordService;

    /**
    * @Description 签到功能接口
    * @Author 老李头儿
    * @Date 2025年04月01 14:29:40
    * @param
    * @Return com.tianji.learning.domain.vo.SignResultVO
    **/
    @PostMapping
    @ApiOperation("签到功能接口")
    public SignResultVO addSignRecords(){
        return recordService.sign();
    }


    /**
    * @Description 查询当月签到记录
    * @Author 老李头儿
    * @Date 2025年04月01 16:23:17
    * @param
    * @Return java.lang.Byte[]
    **/
    @GetMapping
    @ApiOperation("查询当月签到记录")
    public Byte[] querySignRecords(){
        return recordService.querySignRecords();
    }
}
